#ifndef _MY_SCALAR_H
#define _MY_SCALAR_H

#include<math.h>
#include<cstdlib>
#include<cfloat>
#include<float.h>

#if defined(DEBUG) || defined (_DEBUG)
	#define myAssert assert
#else
	#define myAssert(x)
#endif

inline double tfSqrt(double x){return sqrt(x);}
inline double tfFabs(double x) { return fabs(x); }
inline double tfCos(double x) { return cos(x); }
inline double tfSin(double x) { return sin(x); }
inline double tfTan(double x) { return tan(x); }
inline double tfAcos(double x) { if (x<double(-1))	x=double(-1); if (x>double(1))	x=double(1); return acos(x); }
inline double tfAsin(double x) { if (x<double(-1))	x=double(-1); if (x>double(1))	x=double(1); return asin(x); }
inline double tfAtan(double x) { return atan(x); }
inline double tfAtan2(double x, double y) { return atan2(x, y); }
inline double tfExp(double x) { return exp(x); }
inline double tfLog(double x) { return log(x); }
inline double tfPow(double x,double y) { return pow(x,y); }
inline double tfFmod(double x,double y) { return fmod(x,y); }
#define TFSIMD_EPSILON      DBL_EPSILON
#define TFSIMD_PI           double(3.14159265358979323846)

#endif